<?php

  $WorkTable = &$_SQL_TABLE[$GlobPart];
  $WorkTableKeyFieldName = 'code';
  $_FLAGS['NoCheckLangFieldsInTable'] = __TRUE;

  $TabFields['c'] = getFieldNamesWithLangs($WorkTable, array('title'));

  if($_REQUEST['mode'] == $GlobPart)
  {
    $PageTitle = '$language["admin"]["countries"]." :: ".$Item["'.$TabFields['c']['title'].'"];';
  }
  else
  {
  	$PageTitle = '$language["admin"]["countries"];';
  	$AloneMode = $GlobPart;
  }

   $ConfLangArr = array(
				'title_' => array(
								'type' => 'input',
								'title' => $language['admin']['name'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST,
								'useInList' => $CONFIG['useInListSort'],
								'required' => $CONFIG['AdminReqPatAll'],
								'maxlength' => '50',
								));

  $GeneratedLangArr = getAdminConfigArrayWithLangs($ConfLangArr, $SITE_LANGS);

  $_SQL_TABLE_FIELDS[$GlobPart] = $GeneratedLangArr + array(

				'code' => array(
								'type' => 'input',
								'title' => $language['admin']['code'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['code'],
								'useInList' => $CONFIG['useInListSort'],
								//'noUseInEdit' => 'y',
								'required' => '\w{2}',
								'size' => 2,
								'maxlength' => '2',
								'unique' => 'y',
								),

				'code3' => array(
								'type' => 'input',
								'title' => $language['admin']['code']." A3",
								'useInAddForm' => 'y',
								'addVariable' => $_POST['code3'],
								'useInList' => $CONFIG['useInListSort'],
								//'noUseInEdit' => 'y',
								'required' => '\w{3}',
								'size' => 3,
								'maxlength' => '3',
								'unique' => 'y',
								),

				'number' => array(
								'type' => 'input',
								'title' => $language['admin']['number'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['number'],
								'useInList' => $CONFIG['useInListSort'],
								//'noUseInEdit' => 'y',
								'required' => '\d{3}',
								'size' => 3,
								'maxlength' => '3',
								'unique' => 'y',
								),

				'sorting' => array(
								'type' => 'input',
								'title' => $language['admin']['sorting'],
								'useInAddForm' => 'y',
								'addVariable' => $_POST['sorting'],
								'useInList' => $CONFIG['useInListSort'],
								'size' => 3,
								'inListEdit' => 'list_input',
								'useInListEdit' => 'y',
								'maxlength' => '3',
								),

				'active' => array(
								'type' => 'select_link',
								'title' => $language['admin']['status'],
								'formid' => $CONFIG['activeFormName'],
								'addVariable' => $CONFIG['addCountryActive'],
								'noUseInEdit' => 'y',
								'useInList' => $CONFIG['useInListSort'],
								'inListEdit' => 'select_link',
								'values' => array(
											'y' => array(
													'title' => $language['admin']['active'],
													'className' => 'active',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'n',
																	'varname' => 'active',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
											'n' => array(
													'title' => $language['admin']['inactive'],
													'className' => 'inactive',
													'formFields' => array(
																	'act' => 'status',
																	'varvalue' => 'y',
																	'varname' => 'active',
																	getKeyVarName() => '{$Item.$WorkTableKeyFieldName}',
													),
											),
								),
				),

  );
  $_SQL_TABLE_EDIT_FORMS[$GlobPart] = array('active');

?>